#读取npy文件内容，并转为图片可视化
import numpy as np
import os
import matplotlib.pyplot as plt

origin_dir = "./source_images/"
new_dir = "./dst_images/"
for npy_list in os.listdir(origin_dir):
    arry = np.load(origin_dir + '/' +npy_list)
    plt.imshow(arry)
    plt.savefig(new_dir + npy_list + ".jpg")